package cn.itcast.ssh.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;

import cn.itcast.ssh.dao.OrderDao;
import cn.itcast.ssh.entity.Order;

@Repository
public class OrderDaoImpl implements OrderDao {
	@Autowired
	private HibernateTemplate hibernateTemplate;

	@SuppressWarnings("unchecked")
	@Override
	public List<Order> queryAll() {
		List<Order> list = (List<Order>) hibernateTemplate.find("from Order");
		return list;
	}

}
